home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.ShrapStorm
- {
- var c;
- var c2;
- var stage = "A";
- var Name = "shrapStorm";
- function ShrapStorm()
- {
- this.c = 0;
- this.c2 = 10;
- }
- function switchStage(which)
- {
- this.c = 0;
- this.c2 = 10;
- this.stage = which;
- }
- function createTypeA()
- {
- var _loc3_ = random(4);
- _root.fxID = _root.fxID + 1;
- _root["shrapnelB" + _root.fxID] = new classes.fx.ShrapnelB(_root.randRange(_root.posArray[_loc3_][0],_root.posArray[_loc3_][1]),_root.randRange(_root.posArray[_loc3_][2],_root.posArray[_loc3_][3]),_root.dirArray[_loc3_],_root.fxID);
- _root.addFX("shrapnelB" + _root.fxID);
- this.c = 0;
- this.c2 = _root.randRange(10,50);
- this.c2 *= 1 / _root.dif.speed;
- }
- function createTypeB()
- {
- var _loc3_ = random(4);
- _root.fxID = _root.fxID + 1;
- _root["shrapnelB" + _root.fxID] = new classes.fx.ShrapnelB(_root.randRange(_root.posArray[_loc3_][0],_root.posArray[_loc3_][1]),_root.randRange(_root.posArray[_loc3_][2],_root.posArray[_loc3_][3]),_root.dirArray[_loc3_],_root.fxID);
- _root.addFX("shrapnelB" + _root.fxID);
- this.c = 0;
- this.c2 = _root.randRange(5,20);
- this.c2 *= 1 / _root.dif.speed;
- }
- function main()
- {
- this.c = this.c + 1;
- if(this.c >= this.c2)
- {
- this["createType" + this.stage]();
- }
- }
- }
-